﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CodeSmackdown.Web
{
    public static class Extensions
    {
        public static Models.User User(this System.Web.SessionState.HttpSessionState session)
        {
            return session["User"] as Models.User;
        }

        public static void SetUser(this System.Web.SessionState.HttpSessionState session, Models.User user)
        {
            session["User"] = user;
        }

        public static Models.User User(this HttpSessionStateBase session)
        {
            return session["User"] as Models.User;
        }

        public static void SetUser(this HttpSessionStateBase session, Models.User user)
        {
            session["User"] = user;
        }

        public static Models.Snippet Snippet(this HttpSessionStateBase session)
        {
            return session["Snippet"] as Models.Snippet;
        }

        public static void SetSnippet(this HttpSessionStateBase session, Models.Snippet snippet)
        {
            session["Snippet"] = snippet;
        }

        
    }
}
